
import {get, post} from '@/utils/http'
import {SearchData} from '@/models/home/video'
export const getVideosList = (data: SearchData) => {
    return post('/api/video/pageQueryVideos', data)
}

export const getPublishPeople = (data?: any) => {
    return post('/api/avatar/queryPublicAvatars', data)
}

export const getMinePeople = (data?: any) => {
    return post('/api/avatar/queryMyAvatars', data)
}

export const getAiChat = (data?: any) => {
    return post('/api/aichat/chat', data)
}

export const getMineAudioList = (data?: any)  =>{
    return post('/api/aivoice/queryMyVoices', data)
}

export const getPublicAudioList = (data?: any)  =>{
    return post('/api/aivoice/queryPublicVoices', data)
}

export const getAudioStream = (data?: any)  =>{
    return post('/api/aivoice/audition', data, {
        responseType: 'blob'
    })
}

export const createVideo = (data?: any)  =>{
    return post('/api/video/generateVideo', data)
}

export const updateVideoInfo = (data?: any) => {
    return post('/api/video/updateVideo', data)
}

export const getVideoListStatus = (data: any) => {
    return post('/api/video/queryVideos', data)
}